package com.gitee.swsk33.algorithms.tree.huffmancode;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 赫夫曼编码树结点
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class TreeNode {

	/**
	 * 被编码字符（如果结点不存放编码就默认是字符的ASCII值是0）
	 */
	private char data = 0;

	/**
	 * 权值
	 */
	private int weight;

	/**
	 * 结点左孩子
	 */
	private TreeNode left;

	/**
	 * 结点右孩子
	 */
	private TreeNode right;

	/**
	 * 结点的双亲
	 */
	private TreeNode parent;

}